package com.hurr.service.impl;

import java.util.Collection;

import com.hurr.bo.Saving;
import com.hurr.dao.SavingDao;
import com.hurr.service.SavingService;

/**
 * Implemetation for Saving Service
 * 
 * @author Fernando Perelli
 * 
 */
public class SavingServiceImpl implements SavingService {

	/**
	 * Dao for saving
	 */
	private SavingDao savingDao;

	/**
	 * Set SavingDao
	 * 
	 * @param savingDao
	 */
	public void setSavingDao(SavingDao savingDao) {
		this.savingDao = savingDao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.SavingService#save(com.hurr.bo.Saving)
	 */
	@Override
	public Saving save(Saving saving) {
		return savingDao.save(saving);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.SavingService#update(com.hurr.bo.Saving)
	 */
	@Override
	public void update(Saving saving) {
		savingDao.update(saving);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.SavingService#delete(com.hurr.bo.Saving)
	 */
	@Override
	public void delete(Saving Saving) {
		savingDao.delete(Saving);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.SavingService#findById(java.lang.Long)
	 */
	@Override
	public Saving findById(Long id) {
		return savingDao.findById(id);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.SavingService#findAll()
	 */
	@Override
	public Collection<Saving> findAll() {
		return savingDao.findAll();
	}

}
